package io.gitee.hfl.rocketmq.props;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;

/**
 * rocket 配置
 *
 * @author hefulin
 * @date 2022/09/07 10:24
 */
@ConfigurationProperties(prefix = "rocket")
public class RocketProperties {

    private String secretKey;

    private String address;

    private String accessKey;

    private boolean enable = true;

    @NestedConfigurationProperty
    private RocketConsumerProperties consumer = new RocketConsumerProperties();

    @NestedConfigurationProperty
    private RocketProducerProperties producer = new RocketProducerProperties();

    public String getSecretKey() {
        return secretKey;
    }

    public void setSecretKey(String secretKey) {
        this.secretKey = secretKey;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getAccessKey() {
        return accessKey;
    }

    public void setAccessKey(String accessKey) {
        this.accessKey = accessKey;
    }

    public boolean isEnable() {
        return enable;
    }

    public void setEnable(boolean enable) {
        this.enable = enable;
    }

    public RocketConsumerProperties getConsumer() {
        return consumer;
    }

    public void setConsumer(RocketConsumerProperties consumer) {
        this.consumer = consumer;
    }

    public RocketProducerProperties getProducer() {
        return producer;
    }

    public void setProducer(RocketProducerProperties producer) {
        this.producer = producer;
    }

}
